<?php /*a:6:{s:63:"E:\code\jiaoyou\application\admin\view\package\package_add.html";i:1598939754;s:57:"E:\code\jiaoyou\application\admin\view\public\header.html";i:1598939754;s:54:"E:\code\jiaoyou\application\admin\view\public\css.html";i:1598939754;s:53:"E:\code\jiaoyou\application\admin\view\public\js.html";i:1598939754;s:57:"E:\code\jiaoyou\application\admin\view\public\footer.html";i:1598939753;s:57:"E:\code\jiaoyou\application\admin\view\public\bottom.html";i:1598939754;}*/ ?>
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="renderer" content="webkit">
<meta http-equiv="Cache-Control" content="no-siteapp" />
<title>后台系统</title>
<!--[if lt IE 9]>
<meta http-equiv="refresh" content="0;ie.html" />
<![endif]-->
<link rel="stylesheet" type="text/css" href="http://jiaoyou.com\/style/admin/css/bootstrap.min.css" />
<link rel="stylesheet" type="text/css" href="http://jiaoyou.com\/style/admin/css/font-awesome.min.css" />
<link rel="stylesheet" type="text/css" href="http://jiaoyou.com\/style/admin/css/animate.min.css" />
<link rel="stylesheet" type="text/css" href="http://jiaoyou.com\/style/admin/css/style.min.css" />
<link rel="stylesheet" type="text/css" href="http://jiaoyou.com\/style/admin/css/ffxiang.css" />
<link rel="shortcut icon" href="http://jiaoyou.com\/style/admin/img/favicon.ico">
    <script type="text/javascript" src="http://jiaoyou.com\/style/admin/js/jquery.min.js"></script>
<script type="text/javascript" src="http://jiaoyou.com\/style/admin/js/bootstrap.min.js"></script>
    <script type="text/javascript" src="http://jiaoyou.com\/style/layui/layui.js"></script>
    <link rel="stylesheet" type="text/css" href="http://jiaoyou.com\/style/layui/css/layui.css" />
</head>
<style type="text/css">.gray-bg {
    background: #fff;
}

.wrapper {
    padding: 0px;
}</style>
<body class="gray-bg">
<div class="wrapper wrapper-content">
    <div class="row">
        <form class="form-horizontal" method="post">
            <div class="col-sm-12">
                <div class="ibox-content">


                    <div class="form-group">
                        <label class="col-sm-2 control-label">套餐名称：</label>
                        <div class="col-sm-9">
                            <input class="form-control" type="text" id="name" name="name"
                                   value="<?php echo htmlentities((isset($data['name']) && ($data['name'] !== '')?$data['name']:'')); ?>"/>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-2 control-label">套餐价格：</label>
                        <div class="col-sm-9">
                            <input class="form-control" type="text" id="price" name="price"
                                   value="<?php echo htmlentities((isset($data['price']) && ($data['price'] !== '')?$data['price']:'')); ?>"/>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-2 control-label">市场价：</label>
                        <div class="col-sm-9">
                            <input class="form-control" type="text" id="market_price" name="market_price"
                                   value="<?php echo htmlentities((isset($data['market_price']) && ($data['market_price'] !== '')?$data['market_price']:'')); ?>"/>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-2 control-label">时长(天)：</label>
                        <div class="col-sm-9">
                            <input class="form-control" type="text" id="day" name="day"
                                   value="<?php echo htmlentities((isset($data['day']) && ($data['day'] !== '')?$data['day']:'')); ?>"/>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-2 control-label">描述：</label>
                        <div class="col-sm-9">
                            <input class="form-control" type="text" id="desc" name="desc"
                                   value="<?php echo htmlentities((isset($data['desc']) && ($data['desc'] !== '')?$data['desc']:'')); ?>"/>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-2 control-label">是否推荐：</label>
                        <div class="col-sm-9">
                            <div class="radio i-checks">
                                <label>
                                    <input type="radio" name="is_red" value="0" <?php if(!isset($data['is_red']) or $data['is_red'] == 0): ?>checked="checked" <?php endif; ?> /> 否 </label>
                                <label>
                                    <input type="radio" name="is_red" value="1" <?php if(!isset($data['is_red']) or $data['is_red']  == 1): ?>checked="checked" <?php endif; ?> /> 是 </label>
                            </div>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-2 control-label">是否显示：</label>
                        <div class="col-sm-9">
                            <div class="radio i-checks">

                                <label>
                                    <input type="radio" name="is_show" value="0" <?php if(!isset($data['is_show']) || $data['is_show'] == 0): ?>checked="checked" <?php endif; ?> /> 否 </label>
                                <label>
                                    <input type="radio" name="is_show" value="1" <?php if(!isset($data['is_show']) or $data['is_show'] == 1): ?>checked="checked" <?php endif; ?> /> 是 </label>

                            </div>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-2 control-label">排序：</label>
                        <div class="col-sm-9">
                            <input class="form-control" type="text" id="sort" name="sort"
                                   value="<?php echo htmlentities((isset($data['sort']) && ($data['sort'] !== '')?$data['sort']:'0')); ?>"/>
                        </div>
                    </div>
                </div>
            </div>
            <input type="hidden" name="id" value="<?php echo htmlentities((isset($data['id']) && ($data['id'] !== '')?$data['id']:0)); ?>"/>
        </form>
    </div>
</div>
     
    <script type="text/javascript" src="http://jiaoyou.com\/style/admin/js/content.min.js"></script>
    <link rel="stylesheet" type="text/css" href="http://jiaoyou.com\/style/admin/plugins/sweetalert/sweetalert.css" />
    <script type="text/javascript" src="http://jiaoyou.com\/style/admin/plugins/sweetalert/sweetalert.min.js"></script>
    <script type="text/javascript" src="http://jiaoyou.com\/style/admin/plugins/layer/layer.js"></script>
    <script type="text/javascript" src="http://jiaoyou.com\/style/admin/js/ffxiangIndex.js"></script>
    <script type="text/javascript" src="http://jiaoyou.com\/style/admin/js/common.js"></script>
</body>
</html>
<script type="text/javascript" src="http://jiaoyou.com\/style/admin/js/area.js?ver=20200522"></script>
<script type="text/javascript" src="http://jiaoyou.com\/style/admin/plugins/iCheck/icheck.min.js"></script>
<link rel="stylesheet" type="text/css" href="http://jiaoyou.com\/style/admin/plugins/iCheck/custom.css" />
<script type="text/javascript">
    $(document).ready(function () {
        $(".i-checks").iCheck({
            checkboxClass: "icheckbox_square-green",
            radioClass: "iradio_square-green",
        });
    });

    $("#upload").click(function () {
        layer.open({
            type: 2,
            title: '上传图片',
            shadeClose: true,
            shade: 0.2,
            area: ['70%', '60%'],
            skin: 'shangchuantup',
            content: "<?php echo url('common/upload', ['type' => 'avatar']); ?>",
            shift: -1,
            scrollbar: false,
            moveType: 1,
            moveOut: true
        });
    });
</script>
<script type="text/javascript">
$(document).ready(function(){
    $("#button").click(function(){

      <?php 
      if((request()->controller()=='Article' && request()->action()=='add') || (request()->controller()=='Shop' && request()->action()=='add')){
       ?>

      var images='';
      <?php if(!empty($name)){ ?>
      $(".meiyouuimmag textarea").each(function(ret){
        var img=$(this).data('img');
        if(img){
          img_text=$(this).val();
          if(ret==0){
            images+='"'+img
          }else{
            images+=',"'+img
          }
        }
      });
      if(images){
        images="{"+images+"}";
        $('#images').val(images);
      }else{
        $('#images').val();
      }

      <?php }else{?>
       $(".meiyouuimmag textarea").each(function(ret){
        var img=$(this).data('img');
        if(img){
          img_text=$(this).val();
          if(ret==0){
            images+=''+img
          }else{
            images+=','+img
          }
        }
      });
      if(images){
        $('#images').val(images);
      }else{
        $('#images').val();
      }
        <?php }} 
if(input('?url')){
  echo 'loading("#button button")'."\r\n";
}
 ?>

        ajaxFun("POST","",$(".form-horizontal").serialize(),"json",function(ret){
            if(ret){
                if(ret.ret){
                    swal_msg(ret.ret,'',"success",<?php if(input('?url')){echo input('url');}else{echo 0;} ?>)
                    <?php 
if(input('?url')){
  echo 'loading("#button button",\'<i class="fa fa-check"></i> &nbsp;\'+ret.ret)';
}
 ?>

                    return false;
                }else{
                    layer.msg(ret.err)
                }
            }else{
                swal_msg("错误",ret,"error");
            }
            <?php 
if(input('?url')){
 ?>
loadingClose("#button button",'<i class="fa fa-check"></i> &nbsp;<?php if(isset($name)): ?>修改<?php else: ?>提交<?php endif; ?>')
<?php 
}
 ?>

        });
    });
});

function html2Escape(sHtml) {
 return sHtml.replace(/[<>&"]/g,function(c){return {'<':'&lt;','>':'&gt;','&':'&amp;','"':'&quot;'}[c];});
}
</script>
<style type="text/css">
.tbutton{ 
  position: fixed;
  bottom:0px;
  width: 100%;
  background: #fff;
  padding-top: 20px;
  padding-bottom: 20px;
  border-top: 1px solid #F5EFEF;
  z-index: 99999999999
}
#button{ width:120px; margin: 0 auto;}
.wrapper-content{ margin-bottom:75px;}
</style>

<div class="tbutton">
  <div id="button"><button class="btn btn-w-m btn-primary" type="button"><i class="fa fa-check"></i> &nbsp;<?php if(isset($name)): ?>修改<?php else: ?>提交<?php endif; ?></button></div>
</div>